function mapa(nombre, url, mapid, ano){
    atributos =  crearDetalleMapa(url, ano);
    this.nombre =  nombre;
    this.urlServicio = url;
    this.ano = ano;
    this.mapID = mapid;
    this.campos = null;
    this.jsonAtributos = atributos;
}

function crearDetalleMapa1(url,country,capa) {
    var detalleVariable = [];   
    datoid = 1;    
        $.ajax({
        dataType: "json",
        async: true,
        url: url      
    }).done(function( data ) {
        for( i = 0 ;i < data.features.length - 1;i++)
            {
                var datoPais = [data.features[i].attributes.PerCap_Year, data.features[i].attributes.ValueF];                           
                detalleVariable.push(datoPais);                                
            }                
          var data = new google.visualization.DataTable();
          data.addColumn('number', 'ano');
          data.addColumn('number', 'IngPerCapt');           
          data.addRows(detalleVariable);
          if(detalleVariable.length > 0)
              {
              var data = new google.visualization.arrayToDataTable(detalleVariable);          
              var options = {title:'Ingreso PerCapita de ' + country,
                          hAxis: {title: 'ano', minValue: 0, maxValue: 300},
                          vAxis: {title: 'Ingreso', minValue: 0, maxValue: 5000},
                          legend: 'none'};          
              var chart = new google.visualization.LineChart(document.getElementById(capa));
              chart.draw(data, options);
             }
    });
    
}

